from utils.orm_base import OrmData
from spark.models import LiveRoom
import asyncio


async def run():
    # 初始化数据库连接
    orm = OrmData()
    await orm.init()

    room_list = await LiveRoom.all().values_list('room_id', flat=True)
    print(room_list)

    # 关闭数据库连接
    await orm.close()

if __name__ == '__main__':
    asyncio.run(run())
